package com.xuhuan.demo.pattern.adapter.classadapter;

/**
 * @author huan.xu
 * @date 2021/10/5 23:09
 * @description 普通手机，5V
 */
public class Phone {

    /**
     * 充电
     *
     * @param voltageAdapter
     */
    public void charging(IVoltageAdapter voltageAdapter) {
        if (voltageAdapter.output5V() == 5) {
            System.out.println("手机：电压为5V，可以充电了");
        }
    }
}
